// index.js
const express = require('express');
const app = express();

// 引入控制器文件
const userController = require('./userController');
const roleController = require('./roleController');
// 其他控制器文件...

// 将控制器挂载到路由路径上
app.use('/api/users', userController);
app.use('/api/roles', roleController);
// 其他控制器文件...

const PORT = process.env.PORT || 3000;
app.listen(PORT, () => {
  console.log(`Server is running on port ${PORT}`);
});